package entity;

public class EboolRegister extends ERegister {
	private boolean value = false;
	
	public EboolRegister(String name, int address, String dataType,
			String description, String unit) {
		super(name, address, dataType, description, false, unit);
	}

	@Override
	public Object getValue() {
		return value;
	}

	@Override
	public void setValue(byte b0, byte b1, byte b2, byte b3) {
		boolean newValue = (b0 & 0x01) != 0;
		if (newValue != this.value) {
			this.value = newValue;
			setChanged();
			notifyObservers(value);
		}
	}
}
